<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script defer src="main.bundle.js"></script>
    <link href="output.css" rel="stylesheet">
    <title>动态表单</title>
</head>
<body>
<div id="form">

</div>
<button id="collectDataButton">查看数据</button>
<button id="getConfig">查看数据</button>

<script>
    window.onload = function () {
        console.log(window.DyForm)
        const form = new DyForm.DyForm("form", 'design');

        document.getElementById('collectDataButton').addEventListener('click', () => {
            console.log(form.collectValues())
        })
        document.getElementById('getConfig').addEventListener('click', () => {
            console.log(form.generateConfig())
        })
    }
</script>
</body>
</html>
